Skip to content

feat(genai-anthropic): wrappers for async messages methods#4346

Open
eternalcuriouslearner wants to merge 11 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:feat/wrappers-for-async-messages-methods
Open

feat(genai-anthropic): wrappers for async messages methods#4346
eternalcuriouslearner wants to merge 11 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:feat/wrappers-for-async-messages-methods

Conversation

@eternalcuriouslearner
Copy link
Copy Markdown
Contributor

Description

This change adds sync and async wrappers for Anthropic message streams, keeps telemetry finalization in the wrapper layer, and adds tests for wrapper behavior. It does not wire the wrappers into instrumentation yet.

Fixes #3949 partly

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_async_wrappers.py
  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_sync_messages.py
  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_instrumentor.py

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@eternalcuriouslearner eternalcuriouslearner requested a review from a team as a code owner March 18, 2026 22:54
@eternalcuriouslearner eternalcuriouslearner changed the title feat: wrappers for async messages methods feat(genai-anthropic): wrappers for async messages methods Mar 22, 2026
@xrmx xrmx moved this to Ready for review in Python PR digest Mar 23, 2026
@lzchen lzchen added the gen-ai Related to generative AI label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gen-ai Related to generative AI

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

Add OpenTelemetry instrumentation for the Anthropic Claude Python SDK

3 participants